package kr.hkit.powerjava.chapter25;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class CalPanel extends JPanel{
	private JTextField tfLeft;
	private JLabel lblNewLabel;
	private JTextField tfRight;
	private JLabel lblNewLabel_1;
	private JTextField tfResult;
	
	
	public CalPanel(){
		initialize();
	}
	private void initialize(){
		tfLeft = new JTextField();
		add(tfLeft);
		tfLeft.setColumns(5);
		
		lblNewLabel = new JLabel("*");
		add(lblNewLabel);
		
		tfRight = new JTextField();
		add(tfRight);
		tfRight.setColumns(5);
		
		lblNewLabel_1 = new JLabel("=");
		add(lblNewLabel_1);
		
		tfResult = new JTextField();
		add(tfResult);
		tfResult.setColumns(5);
	}
	
	public String getTfLeft(){
		return tfLeft.getText();
	}
	
	public void setTfLeft(String text){
		tfLeft.setText(text);
	}
	
	public String getTfRight(){
		return tfRight.getText();
	}
	public void setTfRight(String text){
		tfRight.setText(text);
	}
	public String getTfResult(){
		return tfResult.getText();
	}
	public void setTfResult(String text){
		tfResult.setText(text);
	}

}
